class Parent{
    constructor(){
        this.name='张三';
    }
}

class Child extends Parent{
    constructor(){
        super();
        this.sex='男';
    }
}

let parent=new Parent();
let child=new Child();
console.log(child.name);
console.log(child.sex);


